1. Field of the Invention
The present invention relates to a technology for correcting errors and preventing data loss.
2. Description of the Related Art
In a magnetic disk apparatus, the magnetization direction of its magnetic material changes due to aging, and, in due course, data stored therein may not be read correctly. Japanese Patent Application Laid-open No. 2006-139581, for example, discloses a technology for returning the magnetization direction of the magnetic material to its original direction by overwriting data read from a sector to the same sector when a correctable read error occurs in this sector. The process of overwriting data read from a sector to the same sector to correct an error that may results in a fatal error is referred to as rewriting.
In recent years, with the progress in multimedia, a larger storage capacity is required in a magnetic disk apparatus as a medium for storing images and music. Accordingly, storage density of the magnetic disk apparatus is substantially increased, which makes problems not notable in the past cause a serious error.
For example, little space between tracks, which has been reduced to increase the storage density, causes side erase when data is written to a certain sector. In the side erase, a magnetic flux leakage of a magnetic head affects a sector of adjacent tracks. Repeated side erase is likely to lead to errors in a wide range.
However, according to the conventional technology, data is rewritten to only a sector in which a correctable read error has occurred. When there are errors in a wide range as described above, all the errors are not corrected. Accordingly, after a part of sectors is rewritten, a fatal error sometimes occurs in surrounding sectors, and data in these sectors cannot be read.